package com.ikun.admin.modules.sys.vo;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.ikun.common.validate.anno.NotNull;
import com.ikun.common.validate.anno.Regular;
import com.ikun.common.validate.constant.RegularPatternType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

/**
 * @ClassName UserAddOrUpdateVo
 * @Description:
 * @CreateDate: 2024/7/11 17:23
 */
@Data
@ApiModel("新增或者编辑用户vo")
public class UserAddOrUpdateVo {
    @ExcelIgnore
    private Long id;

    @ApiModelProperty("账号")
    private String username;

    @ApiModelProperty("真实名称")
    @NotNull(message = "请填写用户真实名称")
    private String realName;

    @ApiModelProperty("昵称")
    private String nickname;

    @ApiModelProperty("密码")
    private String password;

    @ApiModelProperty("邮箱")
    @NotNull(message = "请填写邮箱")
    @Regular(message = "邮箱格式有误", pattern = RegularPatternType.COMMON_EMAIL)
    private String email;

    @ApiModelProperty("手机号")
    @NotNull(message = "请填写手机号")
    @Regular(message = "手机号格式有误", pattern = RegularPatternType.CHINE_PHONE)
    private String mobile;

    @ApiModelProperty("头像")
    private String headUrl;

    @ApiModelProperty("性别")
    @NotNull(message = "请选择性别")
    private Integer gender;

    @ApiModelProperty("角色集合")
    @NotNull(message = "请选择角色")
//    @NotEmpty(message = "角色不能为空")
    private List<Long> roleIdList;
}
